var stuIdToken = localStorage.getItem("stu_id_token");
var loginToken = localStorage.getItem("login_token");

function get_user_info() {
//	var stuIdToken = localStorage.getItem("stu_id_token");
//	var loginToken = localStorage.getItem("login_token");
	var url = USER_API + "/getUserInfo.do";
	var parms = {
		stuIdToken: stuIdToken,
		loginToken: loginToken
	};
	return httpPost(url, parms);
}

function user_login(stuId,password){
	var url = USER_API + "/login.do";
	var parms = {stuId:stuId,password:password};
	return httpPost(url,parms);
}

function login_out(){
	var url = USER_API + "/logout.do";
	var parms = {stuIdToken:stuIdToken};
	return httpGet(url,parms);
}
function update_password(oldPassword,newPassword){
	var url = USER_API + "/updatePwd.do";
	var parms = {
		stuIdToken: stuIdToken,
		loginToken: loginToken,
		oldPwd:oldPassword,
		newPwd:newPassword
	};
	return httpPost(url,parms);
}

function update_user_info(user){
	var url = USER_API +'/update.do';
	user.stuIdToken = stuIdToken;
	user.loginToken = loginToken;
	return httpPost(url,user);
}
